﻿using System;
using System.IO;
using System.Linq;
using System.Text;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Json;

namespace TrainTicketsRobot
{
    [Serializable]
    class LoginRand
    {
        public LoginRand(string strJson) 
        {
            DataContractJsonSerializer dataConSer = new DataContractJsonSerializer(typeof(LoginRand));
            using (MemoryStream ms = new MemoryStream(Encoding.Unicode.GetBytes(strJson)))
            {
                LoginRand objloginRand = dataConSer.ReadObject(ms) as LoginRand;
                this.loginRand = objloginRand.loginRand;
                this.randError = objloginRand.randError;
            }
        }
        public string loginRand;
        public string randError;
    }
}
